# @Time : 2020/6/28 13:54
# @Author : Fioman 
# @Phone : 13149920693
"""

"""

import time
import functools

def clock(func):
    def clocked(*args):
        t_start = time.perf_counter()
        res = func(*args)
        elapsed = time.perf_counter() - t_start
        name = func.__name__
        arg_str = ", ".join(repr(arg) for arg in args)
        print("{} {}({}) -> {}".format(elapsed, name, arg_str, res))
        return res

    return clocked

@functools.lru_cache()
@clock
def fibonacci(n):
    if n < 2:
        return n
    return fibonacci(n-2) + fibonacci(n-1)

if __name__ == '__main__':
    print(fibonacci(6))